% function plot_h_refine_sample2
v1 = [-1 0];
v2 = [1 0];
v3 = [0 1];
v4 = (v2+v3)/2;
figure('Position',[50 50 700 300]);

% case 1
v = [1.5,0.7];
subplot(1,3,1);
plot([v3(1) v1(1) v2(1) v3(1) v(1) v2(1)],[v3(2) v1(2) v2(2) v3(2) v(2) v2(2)]);
hold on;plot([v1(1) v4(1) v(1)],[v1(2) v4(2) v(2)],'r--');hold off;
axis off; text(-0.1, 0.3,'T_1','FontSize',15);


% case 2
v = [3,0.05]; v5 = (v+v3)/2;
subplot(1,3,2);
plot([v3(1) v1(1) v2(1) v3(1) v(1) v2(1)],[v3(2) v1(2) v2(2) v3(2) v(2) v2(2)]);
hold on;plot([v1(1) v4(1) v5(1) v2(1)],[v1(2) v4(2) v5(2) v2(2)],'r--');hold off;
axis off; text(-0.1, 0.3,'T_1','FontSize',15);axis([-1 3 0 1])


% case 3
v = [0.3,1.5]; v5 = (v+v2)/2;
subplot(1,3,3);
plot([v3(1) v1(1) v2(1) v3(1) v(1) v2(1)],[v3(2) v1(2) v2(2) v3(2) v(2) v2(2)]);
hold on;plot([v1(1) v4(1) v5(1) v3(1)],[v1(2) v4(2) v5(2) v3(2)],'r--');hold off;
axis off; text(-0.1, 0.3,'T_1','FontSize',15);